﻿using SHZY.Common.Security;
using SHZY.BaseData.Entitys.Dto.QmsBaseInspcombinesetting;
using Mapster;

namespace SHZY.BaseData.Entitys.Mapper.QmsBaseInspcombinesetting;

public class Mapper : IRegister
{
	public void Register(TypeAdapterConfig config)
	{
		config.ForType<QmsBaseInspcombinesettingCrInput, QmsBaseInspcombinesettingEntity>()
			.Map(dest => dest.MergeConditions, src => src.mergeConditions.ToJsonString())
		;
		config.ForType<QmsBaseInspcombinesettingEntity, QmsBaseInspcombinesettingInfoOutput>()
			.Map(dest => dest.mergeConditions, src => src.MergeConditions.ToObject<List<string>>())
		;
	}
}
